import adaptee.impl.TFCardImpl;
import adapter.SDAdapterTF;
import target.SDCard;
import target.impl.SDCardImpl;

public class Computer {

    public String read(SDCard sdCard){
        return sdCard.readSd();
    }

    public void write(SDCard sdCard){
        sdCard.writeSD();
    }

    public static void main(String[] args) {
        Computer computer = new Computer();
        //调用转接器
        SDCard card = new SDAdapterTF();
        String read = computer.read(card);
        System.out.println(read);
        computer.write(card);
    }
}
